package blacklist_enum

// 黑名单对象
type blacklistObject int

var BlacklistObject blacklistObject

// 企业
func (c *blacklistObject) Enterprise() int {
	return 1
}

// 车辆
func (c *blacklistObject) Vehicle() int {
	return 2
}

// 驾驶员
func (c *blacklistObject) Driver() int {
	return 3
}

func (c *blacklistObject) ToText(value int) string {
	switch value {

	case 1:
		return "企业"

	case 2:
		return "车辆"

	case 3:
		return "驾驶员"

	}
	return ""
}

func (c *blacklistObject) ToValue(text string) int {
	switch text {

	case "企业":
		return 1

	case "车辆":
		return 2

	case "驾驶员":
		return 3

	}
	return 0
}
